package com.mall.ibatis.persistence.sqlmapdao;

import java.util.List;

import com.mall.ibatis.bean.Frame;
import com.mall.ibatis.bean.FrameEx;
import com.mall.ibatis.persistence.iface.FrameexDAO;
import com.ibatis.dao.client.DaoManager;

public class FrameexOracleDAO  extends BaseSqlMapDao implements FrameexDAO{

	public FrameexOracleDAO(DaoManager daoManager) {
		super(daoManager);
	}

	//管理架构树的加载
	@SuppressWarnings("unchecked")
	public List<Frame> frameexTreeLoading(String dir) {
		return queryForList("frameex_tree_loading",dir);
	}

	//查找节点数据
	public Frame selecFrameex(String frameexID) {
		return (Frame) queryForObject("select_frameex", frameexID);
	}

	//节点修改保存
	public int saveFrameex(Frame frameex) {
		return update("save_frameex",frameex);
	}

	//节点删除
	public void deleteFrameex(Frame frameex) throws Exception{
		delete("delete_frameex",frameex);
	}

	//新增子节点
	public String addSubFrameex(Frame frameex) {
		return (String)insert("add_sub_frameex",frameex);
	}
	
	@SuppressWarnings("unchecked")
	public List<FrameEx> selectAllFrameEx() throws Exception
	{
		return (List<FrameEx>)queryForList("select_all_frameex",null);
	}

	@SuppressWarnings("unchecked")
	public List<String> selectFrameexNameByPId(String subFrameexParentID) {		
		return queryForList("selectFrameexNameByPId",subFrameexParentID);
	}

}
